package com.scott.spring.ch05.service;

import javax.annotation.PostConstruct;

/**
 * @author 黄后林
 * @version 1.0
 * @date 2021-12-14 13:46:47
 */
public class RoleService {




    public RoleService() {
        System.out.println("--------执行ch05#RoleService--------");
    }


    @PostConstruct
    public void init(/*int x*/){
        //在容器启动完毕后就告诉我10+20=多少?
        System.out.println(add(10,20));
    }

    @PostConstruct
    public void sdfsdf(/*int x*/){
        //在容器启动完毕后就告诉我10+20=多少?
        System.out.println(add(30,20));
    }
    public int add(int x,int y){
        int sum =x+y;
        return sum;
    }
}
